import request from '@/utils/request'
/**
 * 获取评论或评论回复
 * @param {object} params type,source,offset,limit
 * @returns Promise
 */
export const getCommentsAPI = (params) => {
  return request({
    url: '/v1_0/comments',
    params
  })
}
/**
 * 对文章或者评论进行评论
 * @param {string} target 评论的目标id
 * @param {string} content 评论内容
 * @param {string} art_id 文章id
 * @returns Promise
 */
export const postCommentsAPI = (data) => {
  return request({
    url: '/v1_0/comments',
    method: 'POST',
    data
  })
}
